@extends('Layout/personBase')

@section('title', '订单管理')

@section('css')
	<link href="{{asset('Home/css/orstyle.css')}}" rel="stylesheet" type="text/css">
@endsection


@section('right')
	@if (session('receipt'))
		<script>
			alert("{{session('receipt')}}")
		</script>
	@endif
	<!--标题 -->
	<div class="am-cf am-padding">
		<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">订单管理</strong> / <small>Order</small></div>
	</div>
	<hr/>

	<div class="am-tabs am-tabs-d2 am-margin" data-am-tabs>

		

		<div class="am-tabs-bd">
			<div class="am-tab-panel am-fade am-in am-active" id="tab1">
				<div class="order-top">
					<div class="th th-item">
						<td class="td-inner">商品</td>
					</div>
					<div class="th th-price">
						<td class="td-inner">&nbsp;&nbsp;&nbsp;</td>
					</div>
					<div class="th th-number">
						<td class="td-inner">数量</td>
					</div>
					<div class="th th-operation">
						<td class="td-inner">积分价格</td>
					</div>
					<div class="th th-amount">
						<td class="td-inner">交易状态</td>
					</div>
					<div class="th th-status">
						<td class="td-inner">订单号</td>
					</div>
					<div class="th th-change">
						<td class="td-inner">交易操作</td>
					</div>
				</div>

				<div class="order-main">
					<div class="order-list">
						@foreach ($orders as $v)
						<!--交易成功-->
						 <input type="hidden" name="id" value="">
						<div class="order-status5">
							<div class="order-title">
								<div class="dd-num">收件人：{{$v->consignee}}</div>
								<div class="dd-num"><span>成交时间：{{$v->generation_time}}</span></div>
								<em>收货地址：{{$v->address}}</em>
							</div>
							<div class="order-content">

								<div class="order-left">
								
									<ul class="item-list">
										<li class="td td-item">
											<div class="item-pic">
												<a href="#" class="J_MakePoint">
													<img src="{{$v->image}}" class="itempic J_ItemImg">
												</a>
											</div>
											<div class="item-info">
												<div class="item-basic-info">
													<a href="#">
														<p>{{$v->ig_name}}</p>
													</a>
												</div>
											</div>
										</li>
										<li class="td td-price">
											<div class="item-price">
												
											</div>
										</li>
										<li class="td td-number">
											<div class="item-number">
												<span>{{$v->number}}</span>
											</div>
										</li>
										<li class="td td-operation">
											<div class="item-operation">
												<p>{{$v->integral_price}}</p>
											</div>
										</li>
									</ul>
									
								</div>

								<div class="order-right">
									<li class="td td-amount">
										<div class="item-amount">
											{{$state[$v->order_status]}}
										</div>
									</li>
									<div class="move-right">
										<input type="hidden" name="order_id" value="">
										<li class="td td-status">
											<div class="item-status">
												<p class="Mystatus"></p>
												<br>
												<p class="order-info"><a href="">{{$v->order_number}}</a></p>
										</li>
										@if ($v->order_status == 1)
											<li class="td td-change">
												<a class="am-btn am-btn-success anniu" href="{{url('/Home/saidIntegral')}}/{{$v->id}}">
													确认收货</a>
											</li>
										@elseif($v->order_status == 2)
											<li class="td td-change">
												<a class="am-btn am-btn-danger anniu" href="{{url('/Home/deleteIntOrder')}}/{{$v->id}}">
													删除订单</a>
											</li>
										@endif
											
										
									</div>
								</div>
							</div>
						</div>
						@endforeach
					</div>

				</div>

			</div>
		</div>
	</div>

@endsection

@section('footer-js')
	
	@if (session('fails'))
		<script>
			alert("{{session('fails')}}");
		</script>
	@endif

	@if (session('success'))
		<script>
			alert("{{session('success')}}");
		</script>
	@endif

@endsection
